package com.zsck.zsali.module;

import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;

import android.os.Bundle;

import com.zsck.zsali.R;
import com.zsck.zsali.base.BaseActivity;
import com.zsck.zsali.bean.MineBean;
import com.zsck.zsali.databinding.ActivityMainBinding;

import java.util.List;

public class MainActivity extends BaseActivity {

    ActivityMainBinding demoBinding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        demoBinding = getViewDataBinding();
        MainViewModel mainModel = new ViewModelProvider(this).get(MainViewModel.class);
        subcribeToModel(mainModel);
    }

    private void subcribeToModel(MainViewModel mainModel) {
        mainModel.listMutableLiveData.observe(this, new Observer<List<MineBean>>() {
            @Override
            public void onChanged(List<MineBean> mineBeans) {

            }
        });


    }

    @Override
    public int getLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void init() {

    }

}